/*
 * adc.h
 *
 *  Created on: 25-11-2012
 *      Author: Skeith
 */

#ifndef ADC_H_
#define ADC_H_

#include "../Startup/general.h"
#include "../Startup/config.h"
#include "../Startup/lpc2xxx.h"
#include "utils.h"

#define CRYSTAL_FREQUENCY FOSC
#define PLL_FACTOR        PLL_MUL
#define VPBDIV_FACTOR     PBSD

#define ADC_PINSEL_MASK (1 << 12 | 1 << 13)

void AdcInit();
void AdcSetPinsel();
tU16 AdcGetResult(tU8 channel);



#endif /* ADC_H_ */
